<%@page contentType="text/html" pageEncoding="UTF-8"%>  
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>  

<jsp:include page="header.jsp"/>
    
    <!-- Initialiser les parametres (s'il n'existent pas) -->
    <c:if test="${param['action'] == null}">
        <SCRIPT type="text/javascript">
            initialiserParams();
        </SCRIPT>
    </c:if>

    <!-- Conteneur global -->
    <div id="indexGlobal" >
        
        <!-- Logo site -->
        <div id="logoSite" >
            <br>
            <h1>Gestionnaire de photos</h1>
            <br>
        </div>
    
        <!-- Buttons d'ouverture des slides -->
        <div id="listeButtonsIndex">
            <button id="buttonConnexion" onclick="changerParamServeur('indexDivConnexionAffiche', true);divAfficherCacher('#slideConnexion', '#slideInscription');" type="submit" name="submit" class="btn btn-success">Connexion</button>
            <button id="buttonInscription" onclick="changerParamServeur('indexDivConnexionAffiche', false);divAfficherCacher('#slideInscription', '#slideConnexion');" type="submit" name="submit" class="btn btn-success">Inscription</button>
        </div>
        
        <!-- Conteneur s'aggrandissant -->
        <div id="indexConteneurSlide"> 
            <c:choose>
                <c:when test="${cookie.indexDivConnexionAffiche.value == 'true'}">
                    <!-- Slide Connexion -->
                    <div id="slideConnexion" style="overflow: hidden;">
                        <jsp:include page="connexion.jsp"/>  
                    </div>

                    <!-- Slide Inscription -->
                    <div id="slideInscription" style="overflow: hidden; display: none;">
                        <jsp:include page="inscription.jsp"/> 
                    </div>
                </c:when>
                <c:otherwise>
                    <div id="slideConnexion" style="overflow: hidden; display: none;">
                        <jsp:include page="connexion.jsp"/>  
                    </div>

                    <!-- Slide Inscription -->
                    <div id="slideInscription" style="overflow: hidden;">
                        <jsp:include page="inscription.jsp"/> 
                    </div>
                </c:otherwise>
            </c:choose>
            
        </div>
    
    </div>

<jsp:include page="footer.jsp"/>   